'**************************************'
'  Commencing Date Validation on change'
'			FORM B ,C A& D			   '
'**************************************'

Sub CDDay(FormName)
	if LEN(FormName.txtCDDay.value) <> 2 THEN
		Call KeyTaxMessageBox("The day you have entered, is not valid", "Input error", "Exclamation")
		FormName.focusset.value="CDDaySet"
		FormName.txtCD.value=""
	Else
		THEMONTH = FormName.txtCDMonth.value
		If len(THEMONTH) = 2 Then
			strMM = GetMonth(THEMONTH)
			If strMM = "NotValid" then
				Call KeyTaxMessageBox("The date you have entered, is not valid", "Input error", "Exclamation")
				'Msgbox "Date Invalid."
				FormName.focusset.value="CDDaySet"
				FormName.txtCD.value=""
			Else
				If len(FormName.txtCDYear.value)=4 and len(FormName.txtCDDay.value)= 2 then
					NewDate = FormName.txtCDDay.value & " " &  strMM & " " & FormName.txtCDYear.value		
						If ISDATE(Newdate)=FALSE THEN
							Call KeyTaxMessageBox("The date you have entered, is not valid", "Input error", "Exclamation")
							'msgbox "Date Invalid"
							FormName.focusset.value="CDDaySet"
							FormName.txtCD.value=""
						Else
							FormName.txtCD.value = NewDate
						End	If
				else
					Call KeyTaxMessageBox("The date you have entered, is not valid", "Input error", "Exclamation")
					'msgbox "Date Invalid"
					FormName.focusset.value="CDDaySet"
					FormName.txtCD.value=""
				end If
			end If
		else
			Call KeyTaxMessageBox("The date you have entered, is not valid", "Input error", "Exclamation")			
			'msgbox "Date Invalid"
			FormName.focusset.value="CDDaySet"
			FormName.txtCD.value=""
		end If
	end If
End Sub

'*******************************************'
'  Commencing Full Date Validation on change'
'			FORM B ,C A& D		 			'
'*******************************************'
Function ValidateDate(sDateValue, sDateMsg, sMsgTitle )

Dim lYearNo
Dim lMonthNo
Dim lDayNo
Dim sFullDate

	ValidateDate = true
	if LEN(sDateValue) <> 8 THEN
		Call KeyTaxMessageBox("Invalid " & sDateMsg & " captured - must be YYYYMMDD", sMsgTitle, "Exclamation")
		'MSGBOX "Invalid " & sDateMsg & " captured - must be YYYYMMDD", , sMsgTitle
		ValidateDate = false
		exit function
	End if
	lDayNo = mid(sDateValue, 7, 2)
	lMonthNo = mid(sDateValue, 5, 2)
	lYearNo = left(sDateValue, 4)
	If isnumeric(lMonthNo) = false then
		Call KeyTaxMessageBox("Invalid " & sDateMsg & " captured - must be YYYYMMDD" & vbcrlf & "Invalid Month captured must be within 1 to 12", sMsgTitle, "Exclamation")
		'MSGBOX "Invalid " & sDateMsg & " captured - must be YYYYMMDD" & vbcrlf & "Invalid Month captured must be within 1 to 12", , sMsgTitle
		ValidateDate = false
		exit function
	End if
	If isnumeric(lDayNo) = false then
		Call KeyTaxMessageBox("Invalid " & sDateMsg & " captured - must be YYYYMMDD" & vbcrlf & "Invalid Day captured must be within 1 to 31", sMsgTitle, "Exclamation")
		'MSGBOX "Invalid " & sDateMsg & " captured - must be YYYYMMDD" & vbcrlf & "Invalid Day captured must be within 1 to 31", , sMsgTitle
		ValidateDate = false
		exit function
	End if
	If isnumeric(lYearNo) = false then
		Call KeyTaxMessageBox("Invalid " & sDateMsg & " captured - must be YYYYMMDD" & vbcrlf & "Invalid Year captured must be greater than 1850", sMsgTitle, "Exclamation")
		'MSGBOX "Invalid " & sDateMsg & " captured - must be YYYYMMDD" & vbcrlf & "Invalid Year captured must be greater than 1850", , sMsgTitle
		ValidateDate = false
		exit function
	End if
	If lMonthNo < 1 or lMonthNo > 12 then
		Call KeyTaxMessageBox("Invalid " & sDateMsg & " captured - must be YYYYMMDD" & vbcrlf & "Invalid Month captured must be within 1 to 12", sMsgTitle, "Exclamation")
		'MSGBOX "Invalid " & sDateMsg & " captured - must be YYYYMMDD" & vbcrlf & "Invalid Month captured must be within 1 to 12", , sMsgTitle
		ValidateDate = false
		exit function
	End if
	If lDayNo < 1 or lDayNo > 31 then
		Call KeyTaxMessageBox("Invalid " & sDateMsg & " captured - must be YYYYMMDD" & vbcrlf & "Invalid Day captured must be within 1 to 31", sMsgTitle, "Exclamation")
		'MSGBOX "Invalid " & sDateMsg & " captured - must be YYYYMMDD" & vbcrlf & "Invalid Day captured must be within 1 to 31", , sMsgTitle
		ValidateDate = false
		exit function
	End if
	If lYearNo < 1850 then
		Call KeyTaxMessageBox("Invalid " & sDateMsg & " captured - must be YYYYMMDD" & vbcrlf & "Invalid Year captured must be greater than 1850", sMsgTitle, "Exclamation")
		'MSGBOX "Invalid " & sDateMsg & " captured - must be YYYYMMDD" & vbcrlf & "Invalid Year captured must be greater than 1850", , sMsgTitle
		ValidateDate = false
		exit function
	End if
	sFullDate = lDayNo & " " & GetMonth(lMonthNo) & " " & lYearNo
	If ISDATE(sFullDate) = FALSE THEN
		Call KeyTaxMessageBox("Invalid " & sDateMsg & " captured - must be YYYYMMDD" & vbcrlf & "Invalid Day/Month/Year combination captured", sMsgTitle, "Exclamation")
		'MSGBOX "Invalid " & sDateMsg & " captured - must be YYYYMMDD" & vbcrlf & "Invalid Day/Month/Year combination captured", , sMsgTitle
		ValidateDate = false
		exit function
	end if
		
End Function

Sub ADDay(FormName)
	if LEN(FormName.txtADDay.value) <> 2 THEN
		Call KeyTaxMessageBox("Invalid DAY", "Input Error", "Exclamation")
		'MSGBOX "Invalid DAY"
		FormName.focusset.value="ADDaySet"
		FormName.txtAD.value=""
	Else
			ADMM=FormName.txtADMonth.value
			If len(ADMM) = 2 Then
				strMM = GetMonth(ADMM)
				If strMM = "NotValid" then
					Call KeyTaxMessageBox("The date you have entered, is not valid", "Input Error", "Exclamation")
					'Msgbox "Date Invalid."
					FormName.focusset.value="ADDaySet"
					FormName.txtAD.value=""
				Else
					If len(FormName.txtADYear.value)=4 and len(FormName.txtADDay.value)= 2 then
					NewDate = FormName.txtADDay.value & " " &  strMM & " " & FormName.txtADYear.value		
						If ISDATE(Newdate)=FALSE THEN
							Call KeyTaxMessageBox("The date you have entered, is not valid", "Input Error", "Exclamation")
							'msgbox "Date Invalid"
							FormName.focusset.value="ADDaySet"
							FormName.txtAD.value=""
						Else
							FormName.txtAD.value = NewDate
							If FormName.txtADMonth.value = 01 or FormName.txtADMonth.value = 02 then
								FormName.txtTY.value = FormName.txtADYear.value
							else
								FormName.txtTY.value = FormName.txtADYear.value + 1
							end If
						End If
					else
						Call KeyTaxMessageBox("The date you have entered, is not valid", "Input Error", "Exclamation")
						'msgbox "Date Invalid"
						FormName.focusset.value="ADDaySet"
						FormName.txtAD.value=""
					end If
				END iF
			else
				Call KeyTaxMessageBox("The date you have entered, is not valid", "Input Error", "Exclamation")
				'msgbox "Date Invalid"
				FormName.focusset.value="ADDaySet"
				FormName.txtAD.value=""
			end If
	end If
End Sub


Sub BDDay(FormName)

	'YearChange "frmDirective","txtBdDay","txtBDYear","txtBDMonth","txtBD"

	
	if LEN(FormName.txtBDDay.value) <> 2 THEN
		Call KeyTaxMessageBox("The day you have entered, is not valid", "Input Error", "Exclamation")
		'MSGBOX "Invalid DAY"
		FormName.focusset.value="BDDaySet"
		FormName.txtBD.value=""
	Else
		THEMONTH = FormName.txtBDMonth.value
		If len(THEMONTH)=2 then
			strMM = GetMonth(THEMONTH)
			If strMM = "NotValid" then
				Call KeyTaxMessageBox("The date you have entered, is not valid", "Input Error", "Exclamation")
				'Msgbox "Date Invalid."
				FormName.focusset.value="BDDaySet"
				FormName.txtBD.value=""
			Else
			NewDate =FormName.txtBDDay.value  & " " &  strMM & " " & FormName.txtBDYear.value		
			If ISDATE(Newdate)=FALSE THEN
					Call KeyTaxMessageBox("The date you have entered, is not valid", "Input Error", "Exclamation")
					'msgbox "Date Invalid"
					FormName.focusset.value="BDDaySet"
					FormName.txtBD.value=""
				Else
				FormName.txtBD.value = NewDate
				End If
			END iF
		Else
			Call KeyTaxMessageBox("The date that you have entered, is not valid", "Input Error", "Exclamation")
			'msgbox "Date Invalid"
			FormName.focusset.value="BDDaySet"
			FormName.txtBD.value=""
		End If
	end If
End Sub

'**************************************'
'  Commencing Date Validation on change'
'			FORM B ,C A& D	           '
'				Year				   '
'**************************************'

Sub CDYear(FormName)
	on error resume next
	Err.Clear
	If Err.number <> 0 then
		Call KeyTaxMessageBox("The year you have entered, is not valid", "Input Error", "Exclamation")
		'MSGBOX "Invalid YEAR"
		FormName.focusset.value="CDYearSet"
		FormName.txtCD.value = ""
	Else
		if LEN(FormName.txtCDYear.value) <> 4 OR FormName.txtCDYear.value = "0000" THEN
			Call KeyTaxMessageBox("The year you have entered, is not valid", "Input Error", "Exclamation")
			'MSGBOX "Invalid YEAR"
			FormName.focusset.value="CDYearSet"
			FormName.txtCD.value = ""
		else
			iF IsNumeric(FormName.txtCDYear.value) = False then
			Call KeyTaxMessageBox("The year you have entered, is not valid", "Input Error", "Exclamation")
			'MSGBOX "Invalid YEAR"
			FormName.focusset.value="CDYearSet"
		FormName.txtCD.value = ""
			else
			If len(FormName.txtCDDay.value) = 2 and len(FormName.txtCDMonth.value) =2  then
			call CDDay(FormName)
			end If
			end If
		end if	
	END iF
End Sub

Sub ADYear(FormName)
	on error resume next
	Err.Clear
	If Err.number <> 0 then
		Call KeyTaxMessageBox("The year you have entered, is not valid", "Input Error", "Exclamation")
		'MSGBOX "Invalid YEAR"
		FormName.focusset.value="ADYearSet"
		FormName.txtAD.value = ""
	Else
		if LEN(FormName.txtADYear.value) <> 4 OR FormName.txtADYear.value = "0000" THEN
			Call KeyTaxMessageBox("The year you have entered, is not valid", "Input Error", "Exclamation")
			'MSGBOX "Invalid YEAR"
			FormName.focusset.value="ADYearSet"
			FormName.txtAD.value = ""
		else
			iF IsNumeric(FormName.txtADYear.value) = False then
			Call KeyTaxMessageBox("The year you have entered, is not valid", "Input Error", "Exclamation")
			'MSGBOX "Invalid YEAR"
			FormName.focusset.value="ADYearSet"
			FormName.txtAD.value = ""
			else
			If len(FormName.txtADDay.value) = 2 and len(FormName.txtADMonth.value) =2  then
			call ADDay(FormName)
			end If
			end If
		end if	
	END iF
End Sub

Sub BDYear(FormName)
	
	on error resume next
	Err.Clear
	If Err.number <> 0 then
		Call KeyTaxMessageBox("The year you have entered, is not valid", "Input Error", "Exclamation")
		'MSGBOX "Invalid YEAR"
		FormName.focusset.value="BDYearSet"
		FormName.txtBD.value = ""
	Else
		if LEN(FormName.txtBDYear.value) <> 4 OR FormName.txtBDYear.value = "0000" THEN
			Call KeyTaxMessageBox("The year you have entered, is not valid", "Input Error", "Exclamation")
			'MSGBOX "Invalid YEAR"
			FormName.focusset.value="BDYearSet"
			FormName.txtBD.value = ""
		else
			iF IsNumeric(FormName.txtBDYear.value) = False then
			Call KeyTaxMessageBox("The year you have entered, is not valid", "Input Error", "Exclamation")
			'MSGBOX "Invalid YEAR"
			FormName.focusset.value="BDYearSet"
			FormName.txtBD.value = ""
			end If
		If len(FormName.txtBDDay.value) = 2 and len(FormName.txtBDMonth.value) =2  then
		call BDDay(FormName)
		end If
		end if
	END iF
End Sub



'**************************************'
'  Commencing Date Validation on change'
'**************************************'

Sub CDMonth(FormName)
	on error resume next
	Err.Clear
	If Err.number <> 0 then
		Call KeyTaxMessageBox("The month you have entered, is not valid", "Input Error", "Exclamation")
		'MSGBOX "Invalid MONTH"
		FormName.focusset.value="CDMonthSet"
		FormName.txtCD.value=""
	Else
		if LEN(FormName.txtCDMonth.value) <> 2 OR FormName.txtCDMonth.value >12 THEN
			Call KeyTaxMessageBox("The month you have entered, is not valid", "Input Error", "Exclamation")
			'MSGBOX "Invalid MONTH"
			FormName.focusset.value="CDMonthSet"
			FormName.txtCD.value=""
		ELSE 
			iF IsNumeric(FormName.txtCDMonth.value) = False then
				Call KeyTaxMessageBox("The month you have entered, is not valid", "Input Error", "Exclamation")
				'MSGBOX "Invalid YEAR"
				FormName.focusset.value="CDMonthSet"
				FormName.txtCD.value=""
			end If
			If len(FormName.txtCDDay.value) = 2 and len(FormName.txtCDYear.value) =4  then
				call CDDay(FormName)
			end If
		END iF
	End If
End Sub

Sub ADMonth(FormName)
	on error resume next
	Err.Clear
	If Err.number <> 0 then
		Call KeyTaxMessageBox("The month you have entered, is not valid", "Input Error", "Exclamation")
		'MSGBOX "Invalid MONTH"
		FormName.focusset.value="ADMonthSet"
		FormName.txtAD.value=""
	Else
		if LEN(FormName.txtADMonth.value) <> 2 OR FormName.txtADMonth.value >12 THEN
			Call KeyTaxMessageBox("The month you have entered, is not valid", "Input Error", "Exclamation")
			'MSGBOX "Invalid MONTH"
			FormName.focusset.value="ADMonthSet"
			FormName.txtAD.value=""
		ELSE 
			iF IsNumeric(FormName.txtADMonth.value) = False then
				Call KeyTaxMessageBox("The year you have entered, is not valid", "Input Error", "Exclamation")
				'MSGBOX "Invalid YEAR"
				FormName.focusset.value="ADMonthSet"
				FormName.txtAD.value=""
			end If
			If len(FormName.txtADDay.value) = 2 and len(FormName.txtADYear.value) =4  then
				call ADDay(FormName)
			end If
		END iF
	End If
End Sub

Sub BDMonth(FormName)
	on error resume next
	Err.Clear
	If Err.number <> 0 then
		Call KeyTaxMessageBox("The month you have entered, is not valid", "Input Error", "Exclamation")
		'MSGBOX "Invalid MONTH"
		FormName.focusset.value="BDMonthSet"
		FormName.txtBD.value=""
	Else
		if LEN(FormName.txtBDMonth.value) <> 2 OR FormName.txtBDMonth.value >12 THEN
			Call KeyTaxMessageBox("The month you have entered, is not valid", "Input Error", "Exclamation")
			'MSGBOX "Invalid MONTH"
			FormName.focusset.value="BDMonthSet"
			FormName.txtBD.value=""
		ELSE 
			iF IsNumeric(FormName.txtBDMonth.value) = False then
				Call KeyTaxMessageBox("The month you have entered, is not valid", "Input Error", "Exclamation")
				'MSGBOX "Invalid MONTH"
				FormName.focusset.value="BDMonthSet"
				FormName.txtBD.value=""
			end If
		END iF
		If len(FormName.txtBDDay.value) = 2 and len(FormName.txtBDYear.value) =4  then
			call BDDay(FormName)
		end If
	
	End If
End Sub

'**************************************'
'  FUNCTION FOR MONTH  LONG DATE	   '
'			FORM B ,C A& D & Directive '
'**************************************'

Public Function GetMonth(THEMONTH)
		Select Case THEMONTH
			Case 01 GetMonth = "Jan"
			Case 02 GetMonth = "Feb"
			Case 03 GetMonth = "Mar"
			Case 04 GetMonth = "Apr"
			Case 05 GetMonth = "May"
			Case 06 GetMonth = "Jun"
			Case 07 GetMonth = "Jul"
			Case 08 GetMonth = "Aug"
			Case 09	GetMonth = "Sep"
			Case 10 GetMonth = "Oct"
			Case 11 GetMonth = "Nov"
			Case 12 GetMonth = "Dec"
			Case else GetMonth = "NotValid"
		end Select
end Function

'**************************************'
'  Transfer Of funds  Lst YN Drop Down '
'			FORM B ,C A&D 			   '
'**************************************'

Private Function GetTaxYear(ByVal sMonth, ByVal sYear)
	Dim nTaxYear
	
	Select Case UCase(sMonth)
		Case "JAN"
			nTaxYear = CLng(sYear)
		Case "FEB"
			nTaxYear = CLng(sYear)
		Case Else
			nTaxYear = Clng(sYear) + 1
	end Select
	
	GetTaxYear = nTaxYear
End Function ' GetTaxYear


Sub GLS(FormName)
	'If mid(FormName.txtGLS.value,1,1) <> "R" then
	'	If isnumeric(mid(FormName.txtGLS.value,1,1)) then
	'	FormName.txtGLS.value = "R" & FORMATNumber(FormName.txtGLS.value,2)
	'	ELSE
	'	FormName.txtGLS.value = ""
	'	END iF
	'end if
End Sub



Sub AT(FormName)
Dim valid
	'If mid(FormName.txtAT.value,1,1) <> "R" then
	'	If isnumeric(mid(FormName.txtAT.value,1,1)) then
	'	FormName.txtAT.value = "R" & FORMATNumber(FormName.txtAT.value,2)
	'	ELSE
	'	FormName.txtAT.value=""
	'	END iF
	'end if
End Sub



Sub TPAS(FormName)
	'If mid(FormName.txtTPAS.value,1,1) <> "R" then
	'	If isnumeric(mid(FormName.txtTPAS.value,1,1)) then
	'		FormName.txtTPAS.value = "R" & FORMATNumber(FormName.txtTPAS.value,2)
	'	ELSE
	'	FormName.txtTPAS.value=""
	'	END iF
	'end if
End Sub


Sub lstYNChange(FormName)
	Dim SelValue
	
	SelValue="Y"
	
	FormName.strTransferYNIndex.value = FormName.lstYN.selectedIndex
	
	if FormName.lstYN.value = SelValue then
		FormName.txtNF.disabled = false
		FormName.txtFN.disabled = false
		FormName.txtAT.disabled	= false
		FormName.lstFTTrans.disabled = false
		FormName.xferNumber.disabled = false
		
		FormName.txtNF.ClassName = "editablefield"
		FormName.txtFN.ClassName = "editablefield"
		FormName.txtAT.ClassName = "editablefield"
		FormName.lstFTTrans.ClassName = "editablefield"
		FormName.xferNumber.ClassName = "editablefield"
	else
		FormName.txtNF.disabled = True
		FormName.txtFN.disabled = True
		FormName.txtAT.disabled = True
		FormName.lstFTTrans.disabled = True
		FormName.xferNumber.disabled = True
		
		FormName.txtNF.ClassName = "readonlyfield"
		FormName.txtFN.ClassName = "readonlyfield"
		FormName.txtAT.ClassName = "readonlyfield"
		FormName.lstFTTrans.ClassName = "readonlyfield"
		FormName.xferNumber.ClassName = "readonlyfield"
	end if
	
end Sub

Sub ExistingFund(FormName)
		
	lblNewFund.outerHTML = ""
	'FormName.chkNewFund.OUTERHTML="" 'CLEAR CHECK BOX'
	FormName.txtPost1.disabled = true
	FormName.txtPost2.disabled = true
	FormName.txtPost3.disabled = true
	FormName.txtPost4.disabled = true
	FormName.txtPostCode.disabled = true
	FormName.txtCP.disabled = true
	FormName.txtTelCode.disabled = true
	FormName.txtTelNumber.disabled = true
	FormName.txtFundName.DISABLED =TRUE
	FormName.lstFundTypeCreateReasonCombo.disabled = true
		
End Sub
	
Sub lstYNClick(FormName)
	
	Dim SelValue
	
	SelValue="Y"
	
	FormName.strTransferYNIndex.value = FormName.lstYN.selectedIndex
	
	if FormName.lstYN.value = SelValue then
		FormName.txtNF.disabled = false
		FormName.txtFN.disabled = false
		FormName.txtAT.disabled = false
		FormName.lstFTTrans.disabled = false
		FormName.xferNumber.disabled = false
	else
		FormName.txtNF.disabled = True
		FormName.txtNF.VALUE = ""
		FormName.txtFN.disabled = True
		FormName.txtFN.disabled = True
		FormName.txtAT.VALUE= ""
		FormName.lstFTTrans.disabled = True
		FormName.xferNumber.disabled = True
		FormName.xferNumber.VALUE=""
	end if
End Sub

sub GLSClear(FormName)
	call numbersonly()
end Sub


sub TPASClear(FormName)
	call numbersonly()
end Sub

sub TRAClear(FormName)
	call numbersonly()
end Sub

sub OTCClear(FormName)
	call numbersonly()
end Sub

sub txtOtherIdClear()
	call nocommas()
end Sub

sub txtOtherId_onfocus
	
end Sub

sub BDDayClear
	call numbersonly()
end Sub

'**************************************
'	Set the Clear Values for Mistapes *
'**************************************

sub RSAClear()
	call numbersonly()
end Sub

sub ITNClear()
	call numbersonly()
end Sub

sub FundNumberClear()
	call numbersonly()
end Sub

sub BDYearClear()
	call numbersonly()
end Sub

sub BDMonthClear()
	call numbersonly()
end Sub

sub SurClear()
	call nocommas()
	call InvalidCharacterCheck()
end Sub

sub NameClear()
	call nocommas()
	call InvalidCharacterCheck()
end Sub

sub InitClear()
	call nocommas()
	call InvalidCharacterCheck()
end Sub

sub Home1Clear()
	call nocommas()
	call InvalidCharacterCheck()
end Sub

sub Home2Clear()
	call nocommas
	call InvalidCharacterCheck()
end Sub

sub Home3Clear()
	call nocommas()
	call InvalidCharacterCheck()
end Sub

sub Home4Clear()
	call nocommas()
	call InvalidCharacterCheck()
end Sub

sub HomeCodeClear()
	call nocommas()
end Sub

sub Pos1Clear()
	call nocommas()
	call InvalidCharacterCheck()
end Sub

sub Pos2Clear()
	call nocommas()
	call InvalidCharacterCheck()
end Sub

sub Pos3Clear()
	call nocommas()
	call InvalidCharacterCheck()
end Sub

sub Pos4Clear()
	call nocommas()
	call InvalidCharacterCheck()
end Sub

sub PosCodeClear()
	call nocommas()
end Sub

Sub txtPos1_onfocus
	
end Sub

Sub txtPos2_onfocus
	
end Sub
		
Sub txtPos3_onfocus
	
end Sub		

Sub txtPos4_onfocus
	
end Sub		

Sub txtPosCode_onfocus
	
end Sub		

Sub txtHome2_onfocus
		
end Sub

Sub txtHome3_onfocus
	
end Sub		

Sub txtHome4_onfocus
	
end Sub		

Sub txtHomeCode_onfocus
	
end Sub		
		  
Sub txtSur_onfocus
	
end Sub

Sub txtName_onfocus
	
end Sub

sub OtherTaxClear()
	call nocommas()
end sub

sub txtOtherRsn_onfocus
	
end Sub

sub PNClear(FormName)
	call nocommas()
end Sub

sub txtFN_onfocus(FormName)
	
end Sub

sub FNClear(FormName)
	call numbersonly()
end Sub


sub NFClear(FormName)
	call nocommas()
end Sub


sub ATClear(FormName)
	call numbersonly()
end Sub


sub xferNumberClear(FormName)
	call numbersonly()
end Sub

sub FundNameClear(FormName)
	call nocommas()
end Sub

sub CPClear(FormName)
	call nocommas()
end Sub

sub TelCodeClear(FormName)
	call nocommas()
end Sub

sub TelNrClear(FormName)
	call nocommas()
end Sub

sub FPost1Clear(FormName)
	call nocommas()
end Sub

sub FPost2Clear(FormName)
	call nocommas()
end Sub

sub FPost3Clear(FormName)
	call nocommas()
end Sub

sub FPost4Clear(FormName)
	call nocommas()
end Sub

sub FPostCodeClear(FormName)
	call nocommas()
end Sub

sub CDYearClear(FormName)
	call numbersonly()
end Sub

sub CDMonthClear(FormName)
	call numbersonly()
end Sub

sub CDDayClear(FormName)
	call numbersonly()
end Sub

sub ADYearClear(FormName)
	call numbersonly()
end Sub

sub ADMonthClear(FormName)
	call numbersonly()
end Sub

sub ADDayClear(FormName)
	call numbersonly()
end Sub

sub EmplNrClear
	call numbersonly()
end Sub

sub txtEmplNr_onfocus
	
end Sub

sub txtHomeCode_onchange
	If frmDirective.txtHomeCode.value = "0" then
		Call KeyTaxMessageBox("The postal code cannot be zero", "Input Error", "Exclamation")
		'msgBox "Postal Code cannot be zero"
	end If
end Sub


sub txtPosCode_onchange
	If frmDirective.txtPosCode.value = "0" then
		Call KeyTaxMessageBox("The postal code cannot be zero", "Input Error", "Exclamation")
		'msgBox "Postal Code cannot be zero"
	end If
end Sub